/*
 * This file is part of Euphrat.
 *
 * Copyright © 2012 Bart Verhoeven
 *
 * Euphrat is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Euphrat is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Euphrat. If not, see <http://www.gnu.org/licenses/>.
 */
package org.euphrat.client.service.login;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

/**
 * A service that provides a means to authenticate a user.
 *
 * @author Bart Verhoeven
 */
@RemoteServiceRelativePath("loginService")
public interface LoginService extends RemoteService {

  /**
   * Returns login information of the user. If the user is not logged in, it
   * holds a reference to a page to authenticate. If the user is logged in, it
   * knows who is logged in and holds a reference to a page to de-authenticate.
   *
   * @param requestUri the URI from which the login request originates
   * @return A context object holding the login information
   */
  LoginContext requestLogin(String requestUri);

}
